<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body {
            background-color: #ccc;
        }

        div:nth-child(2) {
            /* position: absolute;
            left: calc(50% - 55px);
            top: calc(50% - 55px); */
            width: 100px;
            height: 100px;
            margin: auto;
            border: 27px solid #fcc;
            border-color: hotpink;
            border-image-source: linear-gradient(red, yellow);
            /* 使用边框图片之后，边框颜色就失效了 */
            border-image-source: url("./border.png");
            border-image-slice: 27;
            border-image-outset: 0px;
            border-image-width: 1;
            border-image-repeat: space;
        }

    </style>
</head>
<body>
    <div>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum, numquam.</div>
    <div></div>
    <div>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod, expedita.</div>
</body>
</html>